SET SOSDRIVE=S:
SET WINPE_GUID={5b595eec-a5c8-11db-92a8-0030058ccaf1}
SET BCDPATH=Y:\EFI\Microsoft\Boot\ORG

del %BCDPATH% /f

REM Create bootstore
BCDEDIT -createstore %BCDPATH%

bcdedit -store %BCDPATH% -create {bootmgr} /d "Boot Manager"

bcdedit -store %BCDPATH% -create {ramdiskoptions} /d "upKeeper Service OS"
bcdedit -store %BCDPATH% -set {ramdiskoptions} ramdisksdidevice partition=S: 
bcdedit -store %BCDPATH% -set {ramdiskoptions} ramdisksdipath \sources\boot.sdi

bcdedit -store %BCDPATH% -create %WINPE_GUID% /d "upKeeper Service OS" -application osloader

bcdedit -store %BCDPATH% /default %WINPE_GUID%

bcdedit -store %BCDPATH% -set {Default} device ramdisk=[%SOSDRIVE%]\sources\boot.wim,{ramdiskoptions}
bcdedit -store %BCDPATH% -set {Default} path \windows\system32\winload.efi
bcdedit -store %BCDPATH% -set {Default} osdevice ramdisk=[%SOSDRIVE%]\sources\boot.wim,{ramdiskoptions} 
bcdedit -store %BCDPATH% -set {Default} systemroot \windows
bcdedit -store %BCDPATH% -set {Default} winpe yes
bcdedit -store %BCDPATH% -set {Default} nx optin
bcdedit -store %BCDPATH% -set {Default} detecthal yes
bcdedit -store %BCDPATH% -displayorder {Default} -addfirst

bcdedit -import %BCDPATH%
bcdedit -timeout 3